<template>
	<view>
	<!-- 	<view class="selectbox">
			<text></text>
			<image src="../../static/usercenter/selected-icon.png"></image>
		</view> -->
		<view class="tList" v-for="item in list">
			<view class="tList-item">
				<view class="cell01">
					<image :src="item.user.avatar"></image>
				</view>
				<view class="cell02">
					<view class="row01">
						<text class="name">{{item.user.username}}</text>
						<text class="phone">{{item.user.mobile}}</text>
					</view>
					<view class="row02">
						<text>{{item.worktype.workname}}</text>
					</view>
				</view>
				<view class="cell03">
					<view class="row02">{{item.createtime}}</view>
					<view class="row03" v-if="item.status == -1"><button>确认</button></view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {

				list:[]
			}
		},

		onLoad() {

			this.getList();
		},
		methods: {
			getList() {
				let that = this;
				let param = {
					page: 1
				};
				this.$api.userList(param).then(res => {

					console.info(res);
					if (res.code == 1) {
						that.list = res.data;
					} else {

					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.selectbox {
		background: #F9F9F9;
		height: 80rpx;
		line-height: 80rpx;
		display: flex;
		padding: 0 24rpx;

		text {
			flex: auto;
			text-align: right;
			font-size: 28rpx;
			color: #666666;
		}

		image {
			width: 50rpx;
			height: 50rpx;
			margin-top: 15rpx;
		}
	}

	.tList {
		.tList-item {
			display: flex;
			height: 148rpx;
			padding: 40rpx 0;
			margin: 0 40rpx;
			border-bottom: 1rpx solid #EBEBEB;

			.cell01 {
				image {
					width: 110rpx;
					height: 110rpx;
					border-radius: 50%;
				}

				margin-right: 30rpx;
			}

			.cell02 {
				flex: auto;

				.row01 {
					margin-bottom: 36rpx;

					.name {
						font-size: 28rpx;
						color: #333333;
						margin-right: 30rpx;
					}

					.phone {
						font-size: 24rpx;
						color: #333333;
					}
				}

				.row02 {
					font-size: 22rpx;
					color: #666666;

					text {
						border-radius: 5rpx;
						background: #F5F5F5;
						padding: 4rpx 10rpx;
					}
				}
			}

			.cell03 {
				.row01 {
					font-size: 24rpx;
					color: #666666;
					margin-bottom: 36rpx;
					text-align: right;
				}

				.row02 {
					font-size: 24rpx;
					color: #ADADAD;
					margin-bottom: 16rpx;
					text-align: right;
				}

				.row03 {
					width: 140rpx;

					button {
						margin-left: 60rpx;
						background: #FFFFFF;
						height: 50rpx;
						border: 1rpx solid #12ADA9;
						line-height: 50rpx;
						border-radius: 10rpx;
						font-size: 24rpx;
						width: 140rpx;
						color: #12ADA9;
					}
				}
			}
		}
	}
</style>
